﻿@model IList<ProductDetailsModel.TierPriceModel>
@using Nop.Web.Models.Catalog;
@{
    //When there is just one tier (with  qty 1), there are no actual savings in the list.
    var displayTierPrices = Model.Count > 0 && !(Model.Count == 1 && Model[0].Quantity <= 1);
}
@if (displayTierPrices)
{
    <div class="tier-prices">
        <div class="prices-header">
            <strong>@T("Products.TierPrices")</strong>
        </div>
        <div class="prices-list">
            <table class="prices-table">
                <tr>
                    <td class="field-header">
                        @T("Products.TierPrices.Quantity")
                    </td>
                    @foreach (var tierPrice in Model)
                    {
                        <td class="item-quantity">
                            @(tierPrice.Quantity)+
                        </td>
                    }
                </tr>
                <tr>
                    <td class="field-header">
                        @T("Products.TierPrices.Price")
                    </td>
                    @foreach (var tierPrice in Model)
                    {
                        <td class="item-price">
                            @tierPrice.Price
                        </td>
                    }
                </tr>
            </table>
        </div>
    </div>
}